home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Dev / Bgui / AutoDoc / groupclass.doc < prev    next >
Encoding:
Text File  |  2000-05-09  |  14.3 KB  |  570 lines

  1. TABLE OF CONTENTS
  2.  
  3. groupclass/--background--
  4. groupclass/GRM_ADDMEMBER
  5. groupclass/GRM_ADDSPACEMEMBER
  6. groupclass/GRM_DIMENSIONS
  7. groupclass/GRM_INSERTMEMBER
  8. groupclass/GRM_REMMEMBER
  9. groupclass/GRM_REPLACEMEMBER
  10. groupclass/GRM_WHICHOBJECT
  11. groupclass/OM_DISPOSE
  12. groupclass/GROUP_BackFill
  13. groupclass/GROUP_EqualHeight
  14. groupclass/GROUP_EqualWidth
  15. groupclass/GROUP_Inverted
  16. groupclass/GROUP_Member
  17. groupclass/GROUP_SpaceMember
  18. groupclass/GROUP_Spacing
  19. groupclass/GROUP_Style
  20. groupclass/GROUP_[xxx]Offset
  21. groupclass/GROUP_[xxx]Pen
  22.  
  23. groupclass/--background--
  24.  
  25.     NAME
  26.     Class:        groupclass
  27.     Superclass:    baseclass
  28.     Include File:    <libraries/bgui.h>
  29.  
  30.     FUNCTION
  31.     To layout it's members in a specific area.   A groupclass  object may
  32.     have any number of members which are layouted accoording  to a set of
  33.     layout attributes.
  34.  
  35.     The number of members a group can have is only limited by  the amount
  36.     of available memory. This will allow for simple and extremely complex
  37.     layouts.
  38.  
  39. groupclass/GRM_ADDMEMBER
  40.  
  41.     NAME
  42.     GRM_ADDMEMBER -- Add a object to a group.
  43.  
  44.     SYNOPSIS
  45.     err = DoMethod( obj, GRM_ADDMEMBER, member, tag, data, ... );
  46.  
  47.     ULONG        err;
  48.     Object           *member;
  49.     Tag        tag;
  50.     ULONG        data;
  51.  
  52.     FUNCTION
  53.     This  method  can  be  used  to  add  a member to an  existing    group.
  54.     Layout specifice attribute can be passed to suit your layout needs.
  55.  
  56.     INPUTS
  57.     member     - A pointer to the object which you want to add to the group.
  58.     tag,data - This is simply a tagitem array  terminated  by a  TAG_DONE.
  59.            The following attributes are possible:
  60.  
  61.            LGO_FixWidth -- ti_Data contains the  width    at  which  the
  62.             object is fixed.
  63.  
  64.            LGO_FixHeight -- ti_Data contains the height at  which  the
  65.             object is fixed.
  66.  
  67.            LGO_Weight -- Scaling objects  is  weight  controlled.  The
  68.             default weight    an  object get's is 50. This attribute
  69.             can  be  used to  change that setting.
  70.  
  71.            LGO_FixMinWidth -- The  object   is    fixed  at it's minimum
  72.             width.
  73.  
  74.            LGO_FixMinHeight -- The  object  is    fixed  at it's minimum
  75.             height.
  76.  
  77.            LGO_Align -- Normally  only    objects  in  a    vertical group
  78.             are aligned when they  have a  label on  the left side
  79.             of their hitbox.   When  this  attribute  is  TRUE the
  80.             object will get aligned wherever the label is placed.
  81.  
  82.            LGO_NoAlign ** V38 ** -- Normally all objects in a vertical
  83.             group with a label  on    the left of the hitbox are all
  84.             aligned. This tag prevents this.
  85.  
  86.            LGO_Relayout ** V41.10 ** -- Normally the group is layed-out again
  87.             if adding the new member to the group succeeds.  Setting this tag to
  88.             FALSE prevents this so you may do that later calling GRM_RELAYOUT
  89.             explicitly.
  90.  
  91.     EXAMPLE
  92.     Object        *group, *cycle;
  93.  
  94.     DoMethod( group, GRM_ADDMEMBER, cycle, LGO_FixMinHeight, TRUE,
  95.                            LGO_Weight,     DEFAULT_WEIGHT,
  96.                            TAG_END );
  97.  
  98.     This adds a cycle object to a group fixing the height to it's  minimum
  99.     size and the weight to 50.
  100.  
  101.     NOTES
  102.     Please note that the weight of an object affects to width of the object
  103.     in a horizontal group and the height of the object in a vertical group.
  104.  
  105.     Since V40 of the library it  is  allowed  to  use this method to change
  106.     the group contents even while the window in  which the group is located
  107.     is open.
  108.  
  109.     RESULT
  110.     err    - TRUE uppon success, FALSE uppon failure.
  111.  
  112.     If this method was successfull you do not need to dispose  of the added
  113.     member anymore. This will be disposed of as soon as the group  to which
  114.     the member was added is disposed of.
  115.  
  116.     SEE ALSO
  117.     GRM_INSERTMEMBER, GRM_REMMEMBER, GRM_REPLACEMEMBER
  118.  
  119. groupclass/GRM_ADDSPACEMEMBER
  120.  
  121.     NAME
  122.     GRM_ADDSPACEMEMBER -- Add a spacing member.
  123.  
  124.     SYNOPSYS
  125.     err = DoMethod( obj, GRM_ADDSPACEMEMBER, weight );
  126.  
  127.     ULONG        weight;
  128.  
  129.     FUNCTION
  130.     This method can be used to add a special kind of object to the group.
  131.     The member will be a weight controlled spacing in the group.
  132.  
  133.     INPUTS
  134.     weight    - The  weight  of  the    spacing  object.  Please refer to the
  135.         GRM_ADDMEMBER section for more information about weights.
  136.  
  137.     NOTE
  138.     This  method  may  only  be  used  when the group is not active (I.E.
  139.     Displayed in the window).
  140.  
  141.     RESULT
  142.     err    - TRUE uppon success, FALSE uppon failure.
  143.  
  144.     SEE ALSO
  145.     GRM_ADDMEMBER
  146.  
  147. groupclass/GRM_DIMENSIONS
  148.  
  149.     NAME
  150.     GRM_DIMENSIONS -- Find out a group it's minimum size.
  151.  
  152.     SEE ALSO
  153.     This  method  is  sent    to  all members to inquire about their minimum
  154.     sizes. Please refer to the  "methods.doc" file for more information on
  155.     this method.
  156.  
  157. groupclass/GRM_INSERTMEMBER
  158.  
  159.     NAME
  160.     GRM_INSERTMEMBER -- Insert a member behind an existing member.
  161.  
  162.     SYNOPSIS
  163.     err = DoMethod( obj, GRM_INSERTMEMBER, member, pred, tag, data, ... );
  164.  
  165.     ULONG         err;
  166.     Object        *member;
  167.     Object        *pred;
  168.     Tag         tag;
  169.     ULONG         data;
  170.  
  171.     FUNCTION
  172.     This method is basically the same as GRM_ADDMEMBER with the  exception
  173.     that you can determine the object after which the object is added.
  174.  
  175.     INPUTS
  176.     member    - A pointer to the object to insert.
  177.     pred    - This must point to  the object  after  which the  new member
  178.         is inserted.  You may set this to  NULL in which case  the new
  179.         member is inserted at the start of the list.
  180.     tag,data - Here  you  can  pass  a  set  of  tagitems  in which layout
  181.         specific attributes can  be  defined.    Please    refer  to  the
  182.         GRM_ADDMEMBER section for more    information  on  the available
  183.         attributes.
  184.  
  185.     EXAMPLE
  186.     Object        *group, *cycle, *button;
  187.  
  188.     DoMethod( group, GRM_INSERTMEMBER, cycle, button,
  189.                            LGO_FixMinHeight, TRUE,
  190.                            LGO_Weight, DEFAULT_WEIGHT,
  191.                            TAG_END );
  192.  
  193.     This adds a cycle object to a group fixing the height to it's  minimum
  194.     size  and  the weight to 50.  The  cycle  object is inserted after the
  195.     button object.
  196.  
  197.     NOTES
  198.     Please    note  that  the  weight  of  an object affects to width of the
  199.     object    in  a  horizontal  group  and  the  height  of the object in a
  200.     vertical group.
  201.  
  202.     Since V40 of the library it is allowed to use this  method  to    change
  203.     the group contents even while the window in which the group is located
  204.     is open.
  205.  
  206.     RESULT
  207.     err - TRUE uppon success, FALSE uppon failure.
  208.  
  209.     If this method was successfull you do not need to dispose of the added
  210.     member anymore. This will be disposed of as soon as the group to which
  211.     the member was added is disposed of.
  212.  
  213.     SEE ALSO
  214.     GRM_ADDMEMBER, GRM_REMMEMBER
  215.  
  216. groupclass/GRM_REMMEMBER
  217.  
  218.     NAME
  219.     GRM_REMMEMBER -- Remove an object from the group.
  220.  
  221.     SYNOPSIS
  222.     DoMethod( obj, GRM_REMMEMBER, member );
  223.  
  224.     Object        *member;
  225.  
  226.     FUNCTION
  227.     To remove  an  object  previously  added  at  create time or with the
  228.     GRM_ADDMEMBER or GRM_INSERTMEMBER methods.
  229.  
  230.     INPUTS
  231.     member    - A pointer to the object which is  to    be  removed  from the
  232.         group.
  233.  
  234.     RESULT
  235.     No return code specified.
  236.  
  237.     NOTE
  238.     Since V40 of the library it is allowed to use this method  to  change
  239.     the  group  contents  even  while  the    window in  which the group is
  240.     located is open.
  241.  
  242.     After  the  object has been removed you are responsible for disposing
  243.     of the removed object.
  244.  
  245.     SEE ALSO
  246.     GRM_ADDMEMBER, GRM_INSERTMEMBER, intuition.library/DisposeObject()
  247.  
  248. groupclass/GRM_REPLACEMEMBER
  249.  
  250.     NAME
  251.     GRM_REPLACEMEMBER -- ReTplace an object with another.
  252.  
  253.     SYNOPSIS
  254.     rep = DoMethod( obj, GRM_REPLACEMEMBER, rem, add, tag, data, ... )
  255.  
  256.     Object        *rep;
  257.     Object        *rem;
  258.     Object        *add;
  259.     Tag         tag;
  260.     ULONG         data;
  261.  
  262.     FUNCTION
  263.     This method can be used to replace a member of a group    with  another
  264.     member.  It is basically a GRM_REMMEMBER and a GRM_INSERTMEMBER roled
  265.     into one.
  266.  
  267.     INPUTS
  268.     rem    - This should point to the object which is to be replaced.
  269.     add    - This should point to the object which  is  to  replace  the
  270.         object described in "rem".
  271.     tag,data - This  is  an array of attributes which control the way the
  272.         new object is layouted.   The  attributes  allowed  here  are
  273.         exactly the same as  the  attributes  you  can    use  with the
  274.         GRM_ADDMEMBER method.
  275.  
  276.     EXAMPLE
  277.     Object        *group, *cycle, *button;
  278.  
  279.     DoMethod( group, GRM_REPLACEMEMBER, cycle, button,
  280.                          LGO_FixMinHeight, TRUE,
  281.                          LGO_Weight,       DEFAULT_WEIGHT,
  282.                          TAG_END );
  283.  
  284.     This replaces the cycle object with the  button  object in  the  group
  285.     fixing the height to it's minimum  size and setting the weight to 50.
  286.  
  287.     NOTES
  288.     Please    note  that  the  weight  of  an object affects to width of the
  289.     object    in  a  horizontal  group  and  the  height  of the object in a
  290.     vertical group.
  291.  
  292.     Since v40 of the library it is allowed to use this  method  to    change
  293.     the group contents even while the window in which the group is located
  294.     is open.
  295.  
  296.     RESULT
  297.     rep    - A pointer to the replaced object  uppon  success,  and  NULL
  298.         uppon failure.
  299.  
  300.     If  this  method  was  successful  you    do not    need to dispose of the
  301.     member which replaces the other member anymore.  This will be disposed
  302.     of as soon as the group to which  the member was added is disposed of.
  303.  
  304.     You are however responsible to dispose    of  the  object which you have
  305.     replaced.
  306.  
  307.     SEE ALSO
  308.     GRM_ADDMEMBER
  309.  
  310. groupclass/GRM_WHICHOBJECT
  311.  
  312.     NAME
  313.     GRM_WHICHOBJECT -- Find the object at specifice coordinates.
  314.  
  315.     SYNOPSIS
  316.     obj = DoMethod( obj, GRM_WHICHOBJECT, xy );
  317.  
  318.     Object        *obj;
  319.     ULONG         xy;
  320.  
  321.     FUNCTION
  322.     This method  should  be  used  to  find  out which object  is  located
  323.     under  the  given  X/Y coordinates.
  324.  
  325.     INPUTS
  326.     xy    - A 32bit  unsigned  integer  which   holds   the   horizontal
  327.         coordinate in the upper 16 bits  and the  vertical  coordinate
  328.         in the lower 16 bits. The coordinates  should  be  relative to
  329.         the upper-left corner of the window.
  330.  
  331.     NOTE
  332.     Please    note  that this method will only work properly when the window
  333.     in which the group is located is open.
  334.  
  335.     This method is primarily used for the tool tips but may also be useful
  336.     for the application programmer.
  337.  
  338.     RESULT
  339.     Returns the object under the coordinates or NULL if there is no object
  340.     under the given coordinates.
  341.  
  342. groupclass/OM_DISPOSE
  343.  
  344.     NAME
  345.     OM_DISPOSE -- Dispose of the group.
  346.  
  347.     CHANGE
  348.     Before passing to the superclass the group will automatically  dispose
  349.     of all it's members.
  350.  
  351. groupclass/GROUP_BackFill
  352.  
  353.     NAME
  354.     GROUP_BackFill -- ( ULONG )
  355.  
  356.     FUNCTION
  357.     To provide a backfill possibility the same as the frameclass supplies.
  358.     The  data  passed  with  this  tag  should  be the same as defined and
  359.     documented   for   the     FRM_BackFill    attribute  of  the  frameclass
  360.     documentation. Please note that this tag  is overided  when  the group
  361.     has a frame attached to it.
  362.  
  363.     DEFAULT
  364.     0.
  365.  
  366.     APPLICABILITY
  367.     (I).
  368.  
  369.     SEE ALSO
  370.     frameclass.doc/FRM_BackFill, GROUP_BackPen, GROUP_BackDriPen
  371.  
  372. groupclass/GROUP_EqualHeight
  373.  
  374.     NAME
  375.     GROUP_EqualHeight -- ( BOOL )
  376.  
  377.     FUNCTION
  378.     To force all members of the group to get the same minimum height. This
  379.     makes it easy to create a row of objects which    all are  equally high.
  380.  
  381.     DEFAULT
  382.     FALSE.
  383.  
  384.     APPLICABILITY
  385.     (I).
  386.  
  387.     SEE ALSO
  388.     GROUP_EqualWidth
  389.  
  390. groupclass/GROUP_EqualWidth
  391.  
  392.     NAME
  393.     GROUP_EqualWidth -- ( BOOL )
  394.  
  395.     FUNCTION
  396.     To force all members of the group to get the same minimum width.  This
  397.     makes it easy to create a row of objects which    all are  equally wide.
  398.  
  399.     DEFAULT
  400.     FALSE.
  401.  
  402.     APPLICABILITY
  403.     (I).
  404.  
  405.     SEE ALSO
  406.     GROUP_EqualHeight
  407.  
  408. groupclass/GROUP_Inverted
  409.  
  410.     NAME
  411.     GROUP_Inverted -- ( BOOL )
  412.  
  413.     FUNCTION
  414.     To force the members added at create time  to be  AddHead()'ed  to the
  415.     member    list  instead  of  AddTail()'ed.   This  is  necessary for the
  416.     assembly macros of the BGUI package.
  417.  
  418.     DEFAULT
  419.     FALSE.
  420.  
  421.     APPLICABILITY
  422.     (I).
  423.  
  424. groupclass/GROUP_Member
  425.  
  426.     NAME
  427.     GROUP_Member -- ( Object * )
  428.  
  429.     FUNCTION
  430.     To add a member to a group at initialization time.  This tag is read a
  431.     little different than the other tags.  Following  the object a    set of
  432.     layout attributes can be passed.
  433.  
  434.     EXAMPLE
  435.     UBYTE        *labels[] = { "LAB1", "LAB2", NULL };
  436.     Object        *group, *cycle;
  437.  
  438.     /* With macros */
  439.     group = HGroupObject,
  440.         StartMember,
  441.             cycle = Cycle( "Cycle", labels, 0, 0 ),
  442.             FixMinHeight, Weight( DEFAULT_WEIGHT ),
  443.         EndMember,
  444.     EndObject;
  445.  
  446.     /* Without macros */
  447.     group = BGUI_NewObject( BGUI_GROUP_GADGET,
  448.         GROUP_Member,
  449.             cycle = BGUI_NewObject( BGUI_CYCLE_GADGET,
  450.                 LAB_Label,    "Cycle",
  451.                 CYC_Labels,    labels,
  452.                 CYC_Active,    0,
  453.                 GA_ID,        0,
  454.                 TAG_END ), LGO_FixMinHeight, TRUE,
  455.                        LGO_Weight, DEFAULT_WEIGHT,
  456.                        TAG_END, 0,
  457.         TAG_END );
  458.  
  459.     As you can see the layout attributes follow the object    pointer in the
  460.     ti_Data field directly. Therefore it is also important that the layout
  461.     attributes are terminated  with a  TAG_END, 0  rather  then  a    single
  462.     TAG_END. The macros will automatically do this for you.
  463.  
  464.     If by any chance the object you add is NULL. The creation of the group
  465.     will fail. All objects that where successfully added to the  group are
  466.     disposed of in this case.
  467.  
  468.     DEFAULT
  469.     NULL.
  470.  
  471.     APPLICABILITY
  472.     (I).
  473.  
  474.     SEE ALSO
  475.     Methods/GRM_ADDMEMBER
  476.  
  477. groupclass/GROUP_SpaceMember
  478.  
  479.     NAME
  480.     GROUP_SpaceObject -- ( ULONG )
  481.  
  482.     FUNCTION
  483.     To add a weight controlled spacing member at create time.  The data of
  484.     this tag should contain the weight of the spacing.
  485.  
  486.     DEFAULT
  487.     50.
  488.  
  489.     APPLICABILITY
  490.     (I).
  491.  
  492.     SEE ALSO
  493.     GRM_ADDSPACEMEMBER
  494.  
  495. groupclass/GROUP_Spacing
  496.  
  497.     NAME
  498.     GROUP_Spacing -- ( ULONG )
  499.  
  500.     FUNCTION
  501.     Set  the  number of pixels the group uses as a space between the group
  502.     members.
  503.  
  504.     DEFAULT
  505.     0.
  506.  
  507.     APPLICABILITY
  508.     (I).
  509.  
  510. groupclass/GROUP_Style
  511.  
  512.     NAME
  513.     GROUP_Style -- ( ULONG )
  514.  
  515.     FUNCTION
  516.     Set  the  style  of  the  group  to  create.  The following styles are
  517.     possible:
  518.  
  519.     GRSTYLE_HORIZONTAL -- A horizontal group is created.
  520.  
  521.     GRSTYLE_VERTICAL -- A vertical group is created.
  522.  
  523.     DEFAULT
  524.     GRSTYLE_HORIZONTAL.
  525.  
  526.     APPLICABILITY
  527.     (I).
  528.  
  529. groupclass/GROUP_[xxx]Offset
  530.  
  531.     NAME
  532.     GROUP_HorizOffset,       GROUP_VertOffset,         GROUP_LeftOffset,
  533.     GROUP_RightOffset, GROUP_TopOffset, GROUP_BottomOffset -- ( ULONG )
  534.  
  535.     FUNCTION
  536.     Set the offset in pixels from the group borders at which the layouting
  537.     is started. Please note that frames are not taken into consideration.
  538.  
  539.     DEFAULTS
  540.     0.
  541.  
  542.     APPLICABILITY
  543.     (I).
  544.  
  545. groupclass/GROUP_[xxx]Pen
  546.  
  547.     NAME
  548.     GROUP_BackPen, GROUP_BackDriPen -- ( ULONG ) ** V40 **
  549.  
  550.     FUNCTION
  551.     To  determine  the pen or DrawInfo  pen which is used to back fill the
  552.     group. The data  passed here should be the pen number of the color you
  553.     want to be used for the GROUP_BackPen attribute.
  554.  
  555.     The GROUP_BackDriPen  attribute  expects  the DrawInfo index number to
  556.     be used to backfill the group.
  557.  
  558.     Specifying ~0 (-1) for the pens will deactivate the backfill color and
  559.     the class will use the BACKGROUNDPEN for the backfill.
  560.  
  561.     DEFAULTS
  562.     ~0.
  563.  
  564.     APPLICABILITY
  565.     (I).
  566.  
  567.     SEE ALSO
  568.     GROUP_BackFill
  569.  
  570.